//立即预约的所有后台请求接口
import {request} from '@/utils/request.js'

export function save (data) {
	return request({
		url:'/api/reservation/save',
		method:'POST',
		data
	})
}

export function list (authorPhone) {
	return request({
		url:`/api/reservation/list/${authorPhone}`,
		method:'GET'
	})
}

export function getList (authorPhone) {
	return request({
		url:`/api/reservation/recordList/${authorPhone}`,
		method:'GET'
	})
}

export function search (theme) {
	return request({
		url:`/api/reservation/search/${theme}`,
		method:'GET'
	})
}

export function searchRecord (theme) {
	return request({
		url:`/api/reservation/searchRecord/${theme}`,
		method:'GET'
	})
}

export function detail (id) {
	return request({
		url:`/api/reservation/detail/${id}`,
		method:'GET'
	})
}

export function getParticipant (id) {
	return request({
		url:`/api/reservation/detail/parts/${id}`,
		method:'GET'
	})
}

export function cancelMeeting (id) {
	return request({
		url:`/api/reservation/cancel/${id}`,
		method:'POST'
	})
}

export function addLength (data) {
	return request({
		url: '/api/reservation/addLength',
		method:'POST',
		data
	})
}